Skip to main content

UserType

Dealing With UserType

In order to deal with the User and the functionality related to User, we use the UserType interface:

interface UserType {
id?: number;
name?: string;
phone_number?: string;
email?: string;
date_of_birth?: string;
gender?: GenderType; // 'male' | 'female'
insurance_id?: string;
policy_number?: string;
nationality_number?: string;
avatar_media_id?: string;
height?: string;
weight?: string;
blood_type?: BloodType; // 'A+' | 'B+' | 'AB+' | 'O+' | 'A-' | 'B-' | 'AB-' | 'O-'
smoker?: BoolString; // 'yes' | 'no'
alcoholic?: BoolString; // 'yes' | 'no'
marital_status?: MaritalStatus; // 'single' | 'married' | 'divorced' | 'widow'
created_at?: string;
updated_at?: string;
relation_type?: RelationType; // 'personal' | 'father' | 'mother' | 'sister' | 'brother' | 'child' | 'husband' | 'wife' | 'other'
}

User Functionalities

The following are the functions related to user management:

APIParams
createUseruserData: UserType
updateUseruser: UserType,
user_id: string
getUseruser_id: string
getUserspage: number,
perPage: number
deleteUseruser_id: string